import request from '@/utils/request'

export function login(login) {
  return request({
    url: 'api/user/signIn',
    method: 'post',
    data: { login }
  })
}

export function getInfo(token) {
  return request({
    url: 'api/user/getUserInfo',
    method: 'post',
    data: { token }
  })
}

export function logout() {
  return request({
    url: 'api/user/logout',
    method: 'get'
  })
}

export function addUser(obj) {
  return request({
    url: 'api/user/addUser',
    method: 'post',
    data: obj
  })
}

export function getUsers() {
  return request({
    url: 'api/user/getAllUsers',
    method: 'get'
  })
}

export function delUser(name) {
  return request({
    url: 'api/user/DelUser',
    method: 'post',
    data: {
      name
    }
  })
}
export function ChangeAbout(name, stuAbout) {
  return request({
    url: 'api/user/ChangeAbout',
    method: 'post',
    data: {
      name, stuAbout
    }
  })
}

